package cn.rmc.hrm.feign;

import cn.rmc.hrm.domain.Login;
import cn.rmc.hrm.fallbackmethod.LoginFallBackFactroy;
import cn.rmc.hrm.to.LoginMealTo;
import cn.rmc.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "auth-server",fallbackFactory = LoginFallBackFactroy.class)
public interface LoginFeign {
    /**
     *
     * @param login save 保存登录信息
     * @return
     */
    @RequestMapping(value="/login/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody Login login);

    @RequestMapping(value="/meal/saveLoginMeal",method= RequestMethod.POST)
    AjaxResult saveLoginMeal(@RequestBody LoginMealTo mealTo);
}
